package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class BibliotecaAppMain {
    public static void main(String[] args) throws IOException {
        PrintStream printStream = new PrintStream(System.out);
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        MenuIO menu = new MenuIO(bufferedReader, printStream);
        HashMap<String, Book> books = new HashMap<String, Book>();
        List<Movie> movieList = new ArrayList<Movie>();
        MovieLibrary movieLibrary = new MovieLibrary(printStream, movieList);
        Movie movie = new Movie("Schindler's List", "1993", "R", "Spielberg");
        movieLibrary.addMovie(movie);
        String book1 = "Book 1";
        books.put(book1, new Book(book1));
        String book2 = "Book 2";
        books.put(book2, new Book(book2));

        BibliotecaApp bibliotecaApp = new BibliotecaApp(printStream, books, menu, movieLibrary);
        bibliotecaApp.start();

    }
}